package com.zfzs.post.modules.agent.service;

import com.zfzs.post.modules.agent.domain.PolicyDivided;
import com.zfzs.post.modules.agent.service.dto.PolicyDividedQueryCriteria;
import org.springframework.data.domain.Pageable;

import java.math.BigDecimal;

/**
 * @author ck
 * @date 2019-11-27
 */
public interface PolicyDividedService {

    /**
     * queryAll 分页
     *
     * @param criteria
     * @param pageable
     * @return
     */
    Object queryAll(PolicyDividedQueryCriteria criteria, Pageable pageable);

    /**
     * queryAll 不分页
     *
     * @param criteria
     * @return
     */
    Object queryAll(PolicyDividedQueryCriteria criteria);

    /**
     * findById
     *
     * @param id
     * @return
     */
    PolicyDivided findById(Long id);

    /**
     * create
     *
     * @param resources
     * @return
     */
    PolicyDivided create(PolicyDivided resources);

    /**
     * update
     *
     * @param resources
     */
    void update(PolicyDivided resources);

    /**
     * delete
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 查询分润比例
     */
    BigDecimal getPolicyAmount(Long agentId, Long terminalId, Long channelId,String names);

    /**
     * 获取政策信息
     * @param agentId
     * @param terminalId
     * @param channelId
     * @param names
     * @return
     */
    PolicyDivided getPolicyInfo(Long agentId, Long terminalId, Long channelId,String names);

    /**
     * 插入数据
     */
    void addPolicyDivided(Long agentId, Long terminalId, Long channelId, BigDecimal amount,String names);
}